<div>
    <label class="control-label">banner图片：</label>
    <input type="file"
           onchange="angular.element(this).scope().selectFile(this.files)" accept="image/*">
</div>
<br>
<input class="form-control input-lg" type="text" placeholder="内容：限15字，必填" style="margin-left:0px;width: 576px"ng-model="title">
<form class="form-inline">
<div class="form-group" style="margin-top: 30px">
    <div class="form-group">
        <label class="control-label" for="textinput">类型:</label>
        <select ng-model="openType" ng-change="listInit()">
            <option value="">-- 请选择 --</option>
            <option value=1>帖子</option>
            <!--<option value=2>公告</option>-->
            <!--<option value=4>专题</option>-->
            <option value=6>邻里活动</option>
        </select>
        <label class="control-label" for="textinput">关键字:</label>
        <input type="text" class="form-control" placeholder="" style="margin-left:0px;width: 350px"
               ng-model="desc">
        <button type="submit" id="btnSearch" class="form-control btn btn-secondary"
                ng-click="getPushList(openType)">查询
        </button>

        <br><br>
        <button type="submit" id="btnaddbanner" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupBanner(title,openType)">添加到banner
        </button>
        <button type="submit" id="btnadd" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupTopic(title,openType)">添加到话题公告
        </button>

        <button type="submit" id="btnpush" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupMessage(title,openType)">批量推送
        </button>

        <button type="submit" id="btnpushTop" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupTop(title,openType)">批量置顶
        </button>

    </div>
    <div>
    <br>

    </div>
</div>
</form>

<div class="tabbable" id="tabs-932122" style="margin-top: 0px" >
    <label ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')">
        <input style="zoom:1.8;margin-left: 10px;vertical-align:middle" ng-model="ck"
                   type="checkbox" ng-click="allCheck(ck,openType)"/>全选
    </label>
    <!-- Only required for left/right tabs -->

    <!--<paging ng-show="category ==1 || category ==2">-->
        <!--<ul class="pagination" num-pages="tasks.pageCount" current-page="tasks.currentPage"-->
            <!--on-select-page="selectPage(page)">-->
            <!--<li ng-class="{disabled: noPrevious()}"><a ng-click="selectPrevious()">&laquo;</a>-->

            <!--</li>-->
            <!--<li ng-repeat="page in pages" ng-class="{active: isActive(page)}"><a-->
                    <!--ng-click="selectPage(page)">{{page}}</a>-->

            <!--</li>-->
            <!--<li ng-class="{disabled: noNext()}"><a ng-click="selectNext()">&raquo;</a>-->

            <!--</li>-->
            <!--<li ng-show="currentPage>6"><a ng-click="selectPage(1)">首页</a>-->

            <!--</li>-->
        <!--</ul>-->
    <!--</paging>-->

    <div id="tab_question" ng-show="openType ==1">
            <table class="table">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>小区</th>
                    <th>标签</th>
                    <th>问题描述</th>
                    <th>创建者</th>
                    <th>创建时间</th>
                    <!--<th>操作</th>-->
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="question in questionList">
                    <td width="20"><input type="checkbox" name="chkItem" ng-model="questioncheck" ng-click="questionToggle(question)" ng-change="checkChange(chc)"/> </td>
                    <td width="300">{{question.community.communityName}}</td>
                    <td width="200"><span ng-repeat="t in question.tag">{{t.value}} </span>
                    </td>
                    <td width="400">{{question.desc}}</td>
                    <td width="200">{{question.createdBy.nickName}}</td>
                    <td width="300">{{question.dateCreated | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <!--<td width="100">-->
                        <!--<button type="button" class="btn btn-default btn-xs"-->
                                <!--ng-click="showPushMessage(title,question,1)">-->
                            <!--推送-->
                        <!--</button>-->
                    <!--</td>-->
                </tr>

                </tbody>
            </table>

        </div>

    <div id="tab_topic" ng-show="openType ==4">
        <table class="table">
            <thead>
            <tr>
                <th>选择</th>
                <th>小区</th>
                <th>描述</th>
                <th>创建时间</th>
                <!--<th>操作</th>-->
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="top in topicList">
                <td width="20"><input type="checkbox" name="chkItem" ng-model="topiccheck" ng-click="topicListToggle(top)" ng-change="checkChange(chc)"/> </td>
                <td width="200">{{top.community.communityName}}</td>
                <td width="400">【{{top.title}}】{{top.desc}}</td>
                <td width="200">{{top.dateCreated | date:'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
            </tbody>
        </table>
    </div>

    <div id="tab_neighbour" ng-show="openType ==6">
            <table class="table">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>小区</th>
                    <th>描述</th>
                    <th>创建时间</th>
                    <!--<th>操作</th>-->
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="activity in neighbourActivityList">
                    <td width="20"><input type="checkbox" name="chkItem" ng-model="activitycheck" ng-click="neighbourActivityToggle(activity)" ng-change="checkChange(chc)"/> </td>
                    <td width="200">{{activity.community.communityName}}</td>
                    <td width="400">【{{activity.title}}】{{activity.desc}}</td>
                    <td width="200">{{activity.dateCreated | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <!--<td width="100">-->
                        <!--<button type="button" class="btn btn-default btn-xs"-->
                                <!--ng-click="showPushMessage(title,activity,6)">-->
                            <!--推送-->
                        <!--</button>-->
                    <!--</td>-->

                </tr>
                </tbody>
            </table>
        </div>

</div>

<form class="form-inline">
    <div class="form-group" style="float: right;margin-bottom: 30px;margin-right:0px">

        <button type="submit" id="btnaddbanner2" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupBanner(title,openType)">添加到banner
        </button>

        <button type="submit" id="btnadd2" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupTopic(title,openType)">添加到话题公告
        </button>

        <button type="submit" id="btnpush2" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupMessage(title,openType)">批量推送
        </button>

        <button type="submit" id="btnpushTop2" class="form-control btn btn-secondary"
                ng-show="(neighbourActivityList != null && neighbourActivityList != '') ||( questionList != null && questionList != '')"
                ng-click="showPushGroupTop(title,openType)">批量置顶
        </button>

    </div>
</form>
<div class="modal fade" id="showPushMessage">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">推送内容：</h4>
            </div>
            <div class="modal-body">
                <p>
                <ul>
                    <li>推送内容：{{message.desc}}</li>
                    <li>类型：{{message.tag}}</li>
                    <li>描述：{{message.content}}</li>
                    <li>推送小区：{{message.community}}</li>
                    <li>预计发送人数：{{message.uList.length}}</li>
                </ul>

                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmPush()">发送</button>

            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="showPushGroupMessage">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">推送内容：</h4>
            </div>
            <div class="modal-body">
                <p>
                <ul>
                    <li>推送内容：{{groupmessage.desc}}</li>
                    <li>类型：{{groupmessage.tag}}</li>
                    <li>推送数量：{{groupmessage.pushCount}}</li>
                    <li>推送小区：{{groupmessage.communityName}}</li>
                    <li>预计发送人数：{{groupmessage.uCount}}</li>
                </ul>

                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmPushGroup()">发送</button>

            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="showPushGroupTopic">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">添加话题公告内容：</h4>
            </div>
            <div class="modal-body">
                <p>
                <ul>
                    <li>添加话题公告内容：{{grouptopic.message}}</li>
                    <li>类型：{{grouptopic.tag}}</li>
                    <li>推送数量：{{grouptopic.pushCount}}</li>
                    <li>推送小区：{{grouptopic.communityName}}</li>
                </ul>

                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmPushGroupTopic()">确认</button>

            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="showPushGroupBanner">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">添加到Banner</h4>
            </div>
            <div class="modal-body">
                <p>
                <ul>
                    <!--<li>添加话题公告内容：{{groupbanner.message}}</li>-->
                    <!--<li>类型：{{groupbanner.tag}}</li>-->
                    <li>推送数量：{{groupbanner.pushCount}}</li>
                    <li>推送小区：{{groupbanner.communityName}}</li>
                </ul>

                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmPushGroupBanner()">确认</button>

            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="showPushGroupTop">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">添加到Banner</h4>
            </div>
            <div class="modal-body">
                <p>
                <ul>
                    <!--<li>添加话题公告内容：{{groupbanner.message}}</li>-->
                    <!--<li>类型：{{groupbanner.tag}}</li>-->
                    <li>推送数量：{{groupTop.pushCount}}</li>
                    <li>推送小区：{{groupTop.communityName}}</li>
                </ul>

                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmPushGroupTop()">确认</button>

            </div>
        </div>
    </div>
</div>


<script>
    $(function () {
        $('#tabs-932122 a').click(function (e) {
            e.preventDefault();//阻止a链接的跳转行为
            $(this).tab('show');//显示当前选中的链接及关联的content
        })
    })
</script>
